<!DOCTYPE html>
<html
        xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org"
        layout:decorate="~{base/layout}">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>消息中心-我的通知</title>
</head>
<div layout:fragment="content">
    <div class="med_tittle_section">
        <div class="med_img_overlay"></div>
        <div class="container">
            <div class="row">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <div class="med_tittle_cont_wrapper">
                        <div class="med_tittle_cont">
                            <ol class="breadcrumb">
                                <li><a th:href="@{/}">系统首页</a></li>
                                <li>消息中心</li>
                            </ol>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="page-container" style="background-color: lavender;">
        <div class="container">
            <div class="row med_bottompadder50">
                <div class="col-lg-3 col-md-3 col-sm-4 col-xs-12">
                    <li style="font-size: x-large;margin-top: 20px;margin-bottom: 20px;">
                        <a th:href="@{/chat}" style="color: #839d85;">消息列表</a>
                    </li>
                    <div class="lyear-layout-sidebar-scroll">
                        <nav class="sidebar-main">
                            <ul class="nav nav-drawer">
                                <li class="nav-item"
                                    style="display: block;padding-top: 5px;padding-bottom: 5px;background-color: #4cae4c;font-size: 18px;border-bottom: #8fafe4 1px solid;">
                                    <a th:href="@{/chat}" style="color: #ffffff;">
                                        <i class="iconfont icon-home"></i>我的聊天</a>
                                </li>
                                <li class="nav-item"
                                    style="display: block;padding-top: 5px;padding-bottom: 5px;background-color: white;font-size: 18px;border-bottom: #8fafe4 1px solid;border-left: 3px solid #4cae4c;">
                                    <a th:href="@{/auditResult}" style="color: #4cae4c;">
                                        <i class="iconfont icon-home"></i>我的通知</a>
                                </li>
                                <li class="nav-item"
                                    style="display: block;padding-top: 5px;padding-bottom: 5px;background-color: #4cae4c;font-size: 18px;border-bottom: #8fafe4 1px solid;">
                                    <a th:href="@{/information/mypush}" style="color: #ffffff;">
                                        <i class="iconfont icon-home"></i>我的发布</a>
                                </li>
                            </ul>
                        </nav>
                    </div>
                </div>
                <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12">
                    <div class="filter-type-box cy-tabs" style="background-color: transparent;margin-top: 30px">
                        <ul class="nav nav-tabs mb-10">
                            <li class="''">
                                <a th:href="@{/auditResult}"><i class="fa"></i>民事直说审理通知</a></li>
                            <li class="active">
                                <a th:href="@{/auditResult2}"><i class="fa"></i>招工就业审核通知</a></li>
                            <li class="''">
                                <a th:href="@{/auditResult2}"><i class="fa"></i>房屋租赁审核通知</a></li>
                            <li class="pull-right">
                                <div class="search-tags">
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div th:each="recruitmentDTO:${page.content}" class="cy-news-grid-item">
                        <div class="cy-media-body">
                            <div class="cy-grid-body">
                                <h5>
                                    <a><i class="fa fa-tag"></i></a>
                                    <i th:text="招工就业"></i>
                                    <a><i class="fa fa-book"></i></a>
                                    <a th:href="@{/information/recruitmentDetailsUI(id=${recruitmentDTO.id})}"
                                       th:text="'招聘单位 : ' + ${recruitmentDTO.company}"></a>

                                </h5>
                                <!--                <small th:if="${recruitmentDTO.auditStatus}=='审核通过'"-->
                                <!--                       th:text="${recruitmentDTO.dealDescribe}"></small>-->
                                <!--                <small th:if="${recruitmentDTO.auditStatus}=='审核不通过'"-->
                                <!--                       th:text="${recruitmentDTO.endDescribe}"></small>-->
                            </div>

                            <div class="cy-btm-info">
                                <div class="cy-btm-date" th:text="${recruitmentDTO.updateTime}"
                                     style="text-indent: 2em;"></div>
                                <div th:if="${recruitmentDTO.auditStatus}=='审核通过'" class="cy-btm-tags">
                                    <button th:class="describe_success"
                                            th:attr="update-id=${recruitmentDTO.id}, update-auditStatus='审核通过'"
                                            th:text="${recruitmentDTO.auditStatus}"
                                            style="font-weight: bold; color: #4fa718;height: 22px;padding-top: 0px;">
                                        审核状态
                                    </button>
                                </div>
                                <div th:if="${recruitmentDTO.auditStatus}=='审核不通过'" class="cy-btm-tags">
                                    <button th:class="describe_look"
                                            th:attr="update-id=${recruitmentDTO.id}, update-auditStatus='审核不通过'"
                                            th:text="${recruitmentDTO.auditStatus}"
                                            style="font-weight: bold; color: #c93a3a;height: 22px;padding-top: 0px;">
                                        审核状态
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div th:insert="~{base/pageable}"></div>
                </div>

                <!-- 审核结果信息的模态框 -->
                <div class="modal fade" id="auditUpdateModal" tabindex="-2"
                     role="dialog" aria-labelledby="myModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal"
                                        aria-label="Close">
                                    <span aria-hidden="true">&times;</span>
                                </button>
                                <h4 class="modal-title">查看审理描述</h4>
                            </div>
                            <div class="modal-body">
                                <!--要提交的表单 -->
                                <form class="form-horizontal" id="form-submit-audit">
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">审核状态：</label>
                                        <div class="col-sm-7">
                                            <div class="example-box">
                                                <label class="lyear-radio radio-inline"> <input
                                                        type="radio" name="auditStatus"
                                                        value="审核通过" checked="checked"><span>审核通过</span>
                                                </label> <label class="lyear-radio radio-inline"> <input
                                                    type="radio" name="auditStatus"
                                                    value="审核不通过"> <span>审核不通过</span>
                                            </label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">审理不通过描述：</label>
                                        <div class="col-sm-7">
                                            <p type="text" rows="10" cols="45" class="form-control-static"
                                               id="auditDescribe">
                                            </p>
                                            <span class="help-block"></span>
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default"
                                        data-dismiss="modal">关闭
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
                <!--        审核通过描述-->
                <div class="modal fade" id="auditUpdateSuccessModal" tabindex="-2"
                     role="dialog" aria-labelledby="myModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal"
                                        aria-label="Close">
                                    <span aria-hidden="true">&times;</span>
                                </button>
                                <h4 class="modal-title">查看审理描述</h4>
                            </div>
                            <div class="modal-body">
                                <!--要提交的表单 -->
                                <form class="form-horizontal">
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">审理通过描述：</label>
                                        <div class="col-sm-7">
                                            <p type="text" rows="10" cols="45" class="form-control-static">审核通过，已发布！
                                            </p>
                                            <span class="help-block"></span>
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default"
                                        data-dismiss="modal">关闭
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script th:src="@{/chat/layui/layui.all.js}"></script>
    <script th:src="@{/js/jquery_min.js}"></script>
    <script th:src="@{/js/bootstrap.min.js}"></script>
    <script th:src="@{/js/wow.min.js}"></script>
    <script th:src="@{/js/custom.js}"></script>
    <script th:src="@{/plugins/slider-pro/js/jquery.sliderPro.min.js}"></script>
    <script th:src="@{/plugins/owlcarousel/js/owl.carousel.min.js}"></script>
    <script th:src="@{/layer/layer.js}"></script>
    <script th:inline="javascript">

        $(document).on("click", ".describe_look", function () {
            getDescribe($(this).attr("update-id"), $(this).attr("update-auditStatus"));
            console.log($(this).attr("update-auditStatus"));
            $("#auditUpdateModal").modal({
                backdrop: "static"
            });
        });

        $(document).on("click", ".describe_success", function () {
            $("#auditUpdateSuccessModal").modal({
                backdrop: "static"
            });
        });

        function getDescribe(id, auditStatus) {
            $.ajax({
                url: "/platform/information/getInformationDescribeById?id=" + id,
                type: "GET",
                success: function (result) {
                    var userRecruitment = result.extend.userRecruitment;

                    //显示数据之前先清除一下校验样式，如果有的话
                    reset_form("#auditUpdateModal form");

                    $("#auditDescribe").text(userRecruitment.describe);
                    $("#auditUpdateModal input[name=auditStatus]").val([auditStatus]);

                }
            });
        }

        //清空表单样式及内容
        function reset_form(ele) {
            $(ele)[0].reset();
            //清空表单样式
            $(ele).find("*").removeClass("has-error has-success");
            $(ele).find(".help-block").text("");
        }

        //清空表单样式
        function clean_form(ele) {
            //清空表单样式
            $(ele).find("*").removeClass("has-error has-success");
            $(ele).find(".help-block").text("");
        }

        //显示校验结果的提示信息
        function show_validate_msg(ele, status, msg) {
            //清除当前元素的校验状态
            $(ele).parent().removeClass("has-success has-error");
            $(ele).next("span").text("");
            if ("success" === status) {
                $(ele).parent().addClass("has-success");
                $(ele).next("span").text(msg);
            } else if ("error" === status) {
                $(ele).parent().addClass("has-error");
                $(ele).next("span").text(msg);
            }
        }
    </script>
</div>
</html>